<script type="text/javascript" language="javascript">
    <!--
    var currentValue;
    function onSuccessQuestion(oMessage)
    {
        $("#ulQuestion").html(oMessage);
        $("#btnQuestion").attr("disabled",false);
        $("#txtQuestion").val("");
    }

    function onErrorQuestion(x, e)
    {
        alert(x.responseText);
        $("#btnQuestion").attr("disabled",false);
    }

    function onQuestionClick()
    {
        if($.trim($("#txtQuestion").val()) == "")
        {
            alert("请输入您的问题。");
            $("#txtQuestion").focus();
        }
        else
        {
            //$("#divMessage").css("display","block");
            var random = Math.random();
            var question = $("#txtQuestion").val();
            var questionId = <?php echo $row_array["id"]; ?>;
            $.ajax({url:"<?php echo url_for("other/jQuery");?>",data:"random=" + random +"&submitflag=question&question=" + question + "&id=" + questionId ,success: onSuccessQuestion,error:onErrorQuestion});
            $("#btnQuestion").attr("disabled",true);
            //"fjks".su(0,50);
        }
    }


    function getTextCharLength(sourceStr)
{
     sl1=sourceStr.length;
     strLen=0;
     for(i=0;i<sl1;i++)
     {
          if(sourceStr.charCodeAt(i)>255)
              strLen+=2;
          else
              strLen++;
     }
     return strLen;

}

    function testMyMethod(sourceStr)
    {
        if(getTextCharLength(sourceStr.value) > 50)
        {
            sourceStr.value = sourceStr.value.substr(0,sourceStr.value.length-1);
            testMyMethod(sourceStr);
            //sourceStr.val(currentValue) ;
        }
        //else
            //currentValue = sourceStr.value
    }
    //-->
</script>
         <div class="questions">
           <h2><div class="com_tit">问题征集<span>QUESTIONS</span></div></h2>
           <div class="ask">
              <h3><?php echo $row_array["title"]; ?></h3>
              <div class="ask_box">
                  <div class="ask_img"><?php echo "<img src=\"".$row_array["snapshot_big"]."\" >"; ?></div>
                   <div class="ask_input">
                      <textarea name="ask_word" class="ask_word" id="txtQuestion" title="最多可以输入50个汉字。" onkeyup="testMyMethod(this);"></textarea>
                   </div>
                   <div class="question_submit"><input id="btnQuestion" class="ask_submit" type="button" value="提交" onclick="onQuestionClick()" /></div>
                   <div id="divMessage" style="display:none;">正在提交你的问题，请稍等.....</div>
              </div>
              <h3>粉丝们的提问：</h3>
              <div class="fans_ask">
                <ul id="ulQuestion">
                    <marquee width:245px height:65px align="left" direction="up" onmouseover=this.stop() onmouseout=this.start() behavior="scroll" scrollamount=1 scrolldelay=100>
                        <?php echo $questionLi; ?>
                    </marquee>
                </ul>
              </div>
           </div>
         </div>